# _*_ coding: UTF-8 _*_
# @Time     : 2021/11/3 16:21
# @Author   : 郑鲁明
# @Site     : http://www.hzdledu.cn/
# @File     : read_date.py
# @Software : PyCharm

# 读取csv文件
def read_csv(filename):
    with open(filename, mode='r', encoding='utf8') as file1:
        users = file1.readlines()
        users_new = []
        for user in users:
            user = user.rstrip('\n').split(',')
            users_new.append(user)
        # print(users_new)
    return users_new


def read_csv1(filename):
    with open(filename, mode='r', encoding='utf8') as file2:
        cities = file2.readlines()
        cities_new = []
        for city in cities:
            city = city.rstrip('\n')
            cities_new.append(city)
        print(cities_new)
    return cities_new


if __name__ == "__main__":
    # read_csv('../date/users.csv')
    read_csv1('../date/city.csv')